using NHibernate;
using Castle.ActiveRecord;
using Castle.ActiveRecord.Framework.Scopes;

namespace DecisionesInteligentes.iEvalua.Tests.Helpers {
	public class MockScope : AbstractScope
	{
		ISession session;
		public MockScope(ISession session) : base(FlushAction.Auto, SessionScopeType.Custom)
		{
			this.session = session;
		}

		public override bool IsKeyKnown(object key)
		{
			return true;
		}

		public override ISession GetSession(object key)
		{
			return session;
		}
		
		public override void FailSession(ISession session)
		{
		}
	}
}